<script id="{$_rs.identifier}" type="text/plain" style="{$_rs.form_style}">{$_rs.content}</script>
<script type="text/javascript">
$(document).ready(function(){
	var toolbars_{$_rs.id} = [[
		'removeformat','source', '|',
		'bold', 'italic', 'underline', 'strikethrough','|',
		'superscript', 'subscript','|',
		'justifyleft', 'justifycenter', 'justifyright', '|',
		'insertorderedlist', 'insertunorderedlist','forecolor',  '|',
		'indent', 'horizontal','blockquote','|',
		'link', 'unlink','|',
		{if $_rs.btns.image}'simpleupload','insertimage','|',{/if}
		{if $_rs.btns.video}'insertvideo',{/if}
		{if $_rs.btns.file}'attachment',{/if}
		{if $_rs.btns.spechars}'spechars',{/if}
		{if $_rs.btns.emotion}'emotion',{/if}
		'insertpbefore','insertpafter','|',
		{if $_rs.btns.fontfamily}'fontfamily',{/if}
		{if $_rs.btns.fontsize}'fontsize',{/if}
		{if $_rs.btns.paragraph}'paragraph',{/if}
		{if $_rs.btns.insertcode}'insertcode',{/if}
		{if $_rs.btns.table}
		'inserttable','deletetable', 'insertparagraphbeforetable', 'insertrow', 'deleterow', 'insertcol', 'deletecol', 'mergecells', 'mergeright', 'mergedown', 'splittocells', 'splittorows', 'splittocols','|',
		{/if}
		'help'
	]];
	var edit_config_{$_rs.id} = {
		 'UEDITOR_HOME_URL':webroot+'{#js#}/ueditor/'
		,'serverUrl':get_url('ueditor')
		,'toolbars':toolbars_{$_rs.id}
	    ,'initialFrameWidth':'100%'
	    ,'allowDivTransToP': false
	    ,'initialFrameHeight':'{$_rs.height}'
		,'sourceEditorFirst':false
		,'readonly':false
		,'pasteplain':{if $_rs.btns.image}false{else}true{/if}
		,'autoFloatEnabled':{$_rs.is_float ? 'true' : 'false'}
		,'autoHeightEnabled':true
		,'imagePopup':false
		{if $_rs.btns.page},'pageBreakTag':'[:page:]'{/if}
		,'textarea':'{$_rs.identifier}'
	};
	var edit_{$_rs.id} = UE.getEditor('{$_rs.identifier}',edit_config_{$_rs.id});
});
</script>
